<h2>Test.java 文件代码：</h2>
public class Test { public static void main(String args[]){ int x = 30; if( x == 10 ){ System.out.print(&quot;Value of X is 10&quot;); }else if( x == 20 ){ System.out.print(&quot;Value of X is 20&quot;); }else if( x == 30 ){ System.out.print(&quot;Value of X is 30&quot;); }else{ System.out.print(&quot;这是 else 语句&quot;); } } }

<p>以上代码编译运行结果如下：</p>

<pre>
Value of X is 30</pre>
